<div id="talk">
<?php foreach($discussion->result() as $row)  { ?>
<h3><?=$row->title?></h3>
<ol id="disc">
<li>
<div><h5><?=$row->fname?></h5><?=mdate("%M %d", $row->tdate)?>
</div>
<div class="body"><?=$row->topic?></div>
<?php } ?>
</li>

<?php foreach($posts->result() as $post) { ?>
 <li>
 	<div class="left">
		<h5><?=$post->fname?></h5>
		<?=mdate("%M %d", $post->pdate)?>
		
	</div>
	<div class="body"><?php echo $post->body ?></div>
	<?php echo  $this->design->editlinks("discussions", $post->postid, $post->user, "<div class=\"actions\">", "</div>");?>
 </li>
<?php } ?>
</ol>

<?=form_open('discussions/addpost')?>
<?=form_hidden('thisdiscussion', $this->uri->segment(3));?>
<?=form_hidden('user', $this->users->getInfo($this->users->user,'id'));?>

<ol>
	<li><label>Post</label><textarea name="body"></textarea></li>
	<li><input class="submit" type="submit" value="Add post" /></li>
</ol>
</form>